Optimal. Leaf size=53 \[ \frac {2 \tan (c+d x)}{a d}-\frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {\tan (c+d x)}{d (a \cos (c+d x)+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2768, 2748, 3767, 8, 3770} \[ \frac {2 \tan (c+d x)}{a d}-\frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {\tan (c+d x)}{d (a \cos (c+d x)+a)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2748
Rule 2768
Rule 3767
Rule 3770
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x)}{a+a \cos (c+d x)} \, dx &=-\frac {\tan (c+d x)}{d (a+a \cos (c+d x))}-\frac {\int (-2 a+a \cos (c+d x)) \sec ^2(c+d x) \, dx}{a^2}\\ &=-\frac {\tan (c+d x)}{d (a+a \cos (c+d x))}-\frac {\int \sec (c+d x) \, dx}{a}+\frac {2 \int \sec ^2(c+d x) \, dx}{a}\\ &=-\frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {\tan (c+d x)}{d (a+a \cos (c+d x))}-\frac {2 \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{a d}\\ &=-\frac {\tanh ^{-1}(\sin (c+d x))}{a d}+\frac {2 \tan (c+d x)}{a d}-\frac {\tan (c+d x)}{d (a+a \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.69, size = 188, normalized size = 3.55 \[ \frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left (\sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \left (\frac {\sin (d x)}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\sin \left (\frac {c}{2}\right )+\cos \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{a d (\cos (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.10, size = 97, normalized size = 1.83 \[ -\frac {{\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.47, size = 84, normalized size = 1.58 \[ -\frac {\frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} + \frac {2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 99, normalized size = 1.87 \[ \frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {1}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}-\frac {1}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.49, size = 119, normalized size = 2.25 \[ -\frac {\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{{\left (a - \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.40, size = 67, normalized size = 1.26 \[ \frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sec ^{2}{\left (c + d x \right )}}{\cos {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________